@include('user.head')
<div class="row relative_pos ad_row">
	<span class="ad abs_pos col-xs-12" style="left:0%;top:0%;background:url(<%url('user/img/zhuye.jpg')%>) center center;">
		<a href="#"></a>
	</span>
</div>
<div class="wrapper">
	<div class="row no_margin">
		<div class="cp-pp-box col-xs-12">
			@foreach($development as $value)
			<a href="javascript:;" uid="<%$value['uid']%>" class="development fl development_type"><%$value['company_name']%></a>
			@endforeach
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12 no_padding">
			<div class="col-xs-9 no_padding" style="margin-top:30px;">
				<div class="col-xs-12 no_padding" id="devo">
					<div class="col-xs-12 newsBox" style="font-size:16px;" id="newsLists">
					</div>
				</div>
			</div>
			<div class="col-xs-3">
				<a href="#" class="thumbnail">
                  	<img src="" data-holder-rendered="true" style="height: 180px; width: 100%; display: block;">
                </a>
                <a href="#" class="thumbnail">
                 	<img src="" data-holder-rendered="true" style="height: 180px; width: 100%; display: block;">
                </a>
			</div>
		</div>
	</div>
</div>
@include('user.footer')
</body>
@include('user.common')

<script type="text/html" id="newsList">
{%each list as value index}
	<p class="col-xs-6"><a href="<%url('information/detail?nid=')%>{%value.id}">{%truncateText(value.title, 21)}</a></p>
{%/each}
</script>

<script type="text/html" id="developmenList">
{%each list as value index}
	<div class="media">
      <div class="media-left">
        <a href="#">
          <img class="media-object" src="" data-holder-rendered="true" style="width: 100px; height: 100px;">
        </a>
      </div>
      <div class="media-body">
        <h4 class="media-heading" id="media-heading">{%value.title}<a class="anchorjs-link" href="#media-heading"><span class="anchorjs-icon"></span></a></h4>
        <p style="font-size:14px;letter-spacing:1px;color:#666666;margin-top:10px;">{%truncateText(value.description,100)}</p>
      </div>
    </div>
{%/each}
</script>

<script type="text/javascript">
var uid = 0;

$.get("development/get_news", {uid : uid}, function (data){
	var html = template("newsList", {list : data.data});
	$("#newsLists").html(html);
})

$(".development_type").bind("click", function(){
	var uid = $(this).attr("uid");
	$.get("development/get_news", {uid : uid}, function (data){
		if(data.success && data.data.length){
			var html = template("developmenList", {list : data.data});
			$("#newsLists").html(html);
		}else{
			$("#newsLists").html('没有内容!!!!');
		}
	})
})

// getDevelopment();
// function getDevelopment(){
// 	$.get("development/get_development", function (data){
// 		if(data.success && data.data.length){
// 			var html = template("developmenList", {list : data.data});
// 			$("#newsLists").html(html);
// 		}else{
// 			$("#newsLists").html('没有内容!!!!');
// 		}
// 	})
// }

// $("#developmentList").bind("click", function(){
// 	getDevelopment();
// })

</script>
</html>